package com.lyy.Consumer;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author Liangyaoyun
 */
@Slf4j
@Component
@RabbitListener(queuesToDeclare = @Queue("My_Ttl_Timeout_Queue"))
public class TtlConsumer {
    @RabbitHandler
    public void consume(String msg) {
        log.info("接收到一条延迟消息: " + msg);
    }
}
